<template>
<div class="">
    <mt-header v-bind:title="msg">
    </mt-header>
    <nav-bar></nav-bar>
</div>
</template>

<script>
import navBar from '../components/Nav.vue'
export default {
  name: 'myIndex',
  components: { navBar },
  data () {
    return {
      msg: '首页',
      selected : '1'
    }
  },
  methods: {
      next() {
          console.log(this.selected);
          if(this.selected == 1){
              this.$router.push('myapp') //https://router.vuejs.org/zh/guide/essentials/navigation.html
          }
          if(this.selected == 2){
              this.$router.push('images') //https://router.vuejs.org/zh/guide/essentials/navigation.html
          }
          if(this.selected == 3){
              this.$router.push('blogs') //https://router.vuejs.org/zh/guide/essentials/navigation.html
          }
          if(this.selected == 4){
              this.$router.push('user') //https://router.vuejs.org/zh/guide/essentials/navigation.html
          }

        return true;
      }
    }
}
</script>